package org.mybatis.study.provider;

import org.apache.ibatis.jdbc.SQL;

/**
 * 权限Mapper对应的Provider实现
 * @author fangyu
 * @version v1.0.0
 * @date 2020/9/21 6:29 下午
 */
public class PrivilegeProvider {

    public String selectById(final Long id){
        return new SQL(){
            {
                SELECT("id, privilege_name, privilege_url");
                FROM("sys_privilege");
                WHERE("id = #{id}");
            }
        }.toString();
    }

    public String selectById2(final Long id){
        return "select * from sys_privilege where id=#{id}";
    }

}
